//
//  Me_UNLOGINView.m
//  ZZLC
//
//  Created by 杨春至 on 2017/12/18.
//  Copyright © 2017年 ZhongZeng. All rights reserved.
//

#import "Me_UNLOGINView.h"

@implementation Me_UNLOGINView
- (instancetype)initWithFrame:(CGRect)frame
{
   self = [super initWithFrame:frame];
    if (self) {
        self.indicatatorLabel.text = @"平台账户资金由第三方支付平台实时监管";
        self.indicatatorLabel.font = Font(16.0);
        self.indicatatorLabel.textColor = RGBCOLOR(128, 128, 128);
        [self addSubview:self.indicatatorLabel];
        [self addSubview:self.loginBtn];
        [self addSubview:self.registerBtn];

    }
    return self;
    
}
- (UILabel *)indicatatorLabel
{
    if (!_indicatatorLabel) {
        self.indicatatorLabel = [[UILabel alloc]init];
        self.indicatatorLabel.preferredMaxLayoutWidth = SCREEN_WIDTH-30;
        [self addSubview:self.indicatatorLabel];
        [self.indicatatorLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.equalTo(@0);
            make.top.equalTo(@20);
        }];

    }
    return _indicatatorLabel;
}
- (UIButton *)loginBtn
{
    if (!_loginBtn) {
        _loginBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        [_loginBtn setTitle:@"登录" forState:UIControlStateNormal];
        [_loginBtn setBackgroundImage:Image(@"btn_me_login") forState:UIControlStateNormal];
        [self addSubview:_loginBtn];

    }
    return _loginBtn;
}
- (UIButton *)registerBtn
{
    if (!_registerBtn) {
        _registerBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        [_registerBtn setTitle:@"注册" forState:UIControlStateNormal];
        [_registerBtn setTitleColor:RGBCOLOR(255, 207, 78 ) forState:UIControlStateNormal];
        [_registerBtn setBackgroundImage:Image(@"me_btn_register") forState:UIControlStateNormal];
        [self addSubview:_registerBtn];

        
    }
    return _registerBtn;
}
- (void)layoutSubviews{
    [_registerBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@(15));
        make.bottom.equalTo(@-20);
        make.height.equalTo(@34);
//        make.width.equalTo(@150);
        make.width.equalTo(self.mas_width).multipliedBy(0.4);
    }];
    [_loginBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(@(-15));
        make.bottom.equalTo(@(-20));
        make.width.equalTo(_registerBtn);
        make.height.equalTo(_registerBtn);
    }];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
